SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 34395: The 'index' output vector in CALL SORTNDX can lose its value and be reset to zero if it is reassigned to a new vector

DetailsAboutRate It

The 'index' output parameter in CALL SORTNDX is not assigned an element size. Therefore, if you reassign the vector to a new vector, the values are lost and assigned to zeroes.

The problem is illustrated in this example:

       proc iml;
          m = { 1 1 0, 
                2 0 0, 
                1 3 1, 
                2 2 2 }; 
          call SORTNDX(index, m, {1 3}, {3} ); 
          newindex = index; 
          print index newindex; 
        quit; 

To circumvent the problem, initialize the 'index' output parameter before issuing the call:

       proc iml;
          m = { 1 1 0, 
                2 0 0, 
                1 3 1, 
                2 2 2 }; 
          index=0;
          call SORTNDX(index, m, {1 3}, {3} ); 
          newindex = index; 
          print index newindex; 
        quit; 


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/IMLz/OS9 TS M09.2 TS2M2
Microsoft® Windows® for 64-Bit Itanium-based Systems9 TS M09.2 TS2M2
Microsoft Windows Server 2003 Datacenter 64-bit Edition9 TS M09.2 TS2M2
Microsoft Windows Server 2003 Enterprise 64-bit Edition9 TS M09.2 TS2M2
Microsoft Windows 2000 Advanced Server9 TS M0
Microsoft Windows 2000 Datacenter Server9 TS M0
Microsoft Windows 2000 Server9 TS M0
Microsoft Windows 2000 Professional9 TS M0
Microsoft Windows NT Workstation9 TS M0
Microsoft Windows Server 2003 Datacenter Edition9 TS M09.2 TS2M2
Microsoft Windows Server 2003 Enterprise Edition9 TS M09.2 TS2M2
Microsoft Windows Server 2003 Standard Edition9 TS M09.2 TS2M2
Microsoft Windows XP Professional9 TS M09.2 TS2M2
64-bit Enabled AIX9 TS M09.2 TS2M2
64-bit Enabled HP-UX9 TS M09.2 TS2M2
64-bit Enabled Solaris9 TS M09.2 TS2M2
HP-UX IPF9 TS M09.2 TS2M2
Linux9 TS M09.2 TS2M2
OpenVMS Alpha9 TS M09.2 TS2M2
Tru64 UNIX9 TS M09.2 TS2M2
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.